﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RevClinic.Core.Domain
{
    public class PersonalData : ValueObject<PersonalData>
    {
        private readonly string _firstName;
        private readonly string _surname;
        private readonly string _pesel;
        private readonly Address _address;

        public PersonalData() { }

        public PersonalData(string firstName, string surname, string pesel, Address address)
        {
            _firstName = firstName;
            _surname = surname;
            _pesel = pesel;
            _address = address;
        }

        public string FirstName { get { return _firstName; } }

        public string Surname { get { return _surname; } }

        public string Pesel { get { return _pesel; } }

        public Address Address { get { return _address; } }

        protected override IEnumerable<object> GetAtomicValues()
        {
            yield return _firstName;
            yield return _surname;
            yield return _address;
        }
    }
}
